using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace ThridGroup.ERP.WarehouseManagement
{
    /// <summary>
    /// 库区设置
    /// </summary>
    [Table("WarehouseAreaSetting")]
    public class WarehouseAreaSettingModel : Entity<int>
    {
        /// <summary>
        /// 库区编码
        /// </summary>
        [Column("WarehouseAreaCode")]
        public string AreaCode { get; set; } = string.Empty;
        
        /// <summary>
        /// 库区名称
        /// </summary>
        [Column("WarehouseAreaName")]
        public string AreaName { get; set; } = string.Empty;
        
        /// <summary>
        /// 所属仓库ID
        /// </summary>
        [Column("WarehouseId")]
        public int WarehouseId { get; set; }
        
        /// <summary>
        /// 面积
        /// </summary>
        [Column("Area")]
        public decimal Area { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        [Column("Remark")]
        public string Remark { get; set; } = string.Empty;
        
        // 以下字段在数据库中不存在，但在业务逻辑中需要
        [NotMapped]
        public string WarehouseName { get; set; } = string.Empty;
        
        [NotMapped]
        public string Location { get; set; } = string.Empty;
        
        [NotMapped]
        public string ResponsiblePerson { get; set; } = string.Empty;
        
        [NotMapped]
        public string AreaType { get; set; } = string.Empty;
        
        [NotMapped]
        public string StorageType { get; set; } = string.Empty;
        
        [NotMapped]
        public string TemperatureRequirement { get; set; } = string.Empty;
        
        [NotMapped]
        public string HumidityRequirement { get; set; } = string.Empty;
        
        [NotMapped]
        public decimal MaxCapacity { get; set; }
        
        [NotMapped]
        public decimal CurrentUsage { get; set; }
        
        [NotMapped]
        public bool Status { get; set; }
        
        [NotMapped]
        public DateTime CreatedTime { get; set; }
        
        [NotMapped]
        public DateTime? UpdatedTime { get; set; }
        
        /// <summary>
        /// 所属仓库（导航属性，表示一个库区属于一个仓库）
        /// </summary>
        [ForeignKey("WarehouseId")]
        [NotMapped]
        public virtual WarehouseSettingModel Warehouse { get; set; }
    }
} 